This invention relates to methods and apparatus for inspecting the appearance of products.
U.S. Pat. No. 5,146,510 (incorporated by reference herein) discloses product inspection systems which can be set up to acquire most of the information needed to perform a product inspection task with relatively little input from the human operator of the systems. Although the principles of the present invention can be used with other types of inspection systems, the systems of the above-mentioned prior patent are a good context in which to illustratively describe the present invention.
In a typical system in accordance with the prior patent, the data for a relatively small number of representative good product images is combined in a relatively simple way (e.g., using a logical OR function) to produce an initial discriminant function. This initial discriminant function is then used to compute statistical information about a relatively large number of product images compared to the initial discriminant function. For example, the dot product of the initial discriminant function and the data for each product image may be computed. The standard deviation of these dot products may then be computed and used to establish two sets of threshold values. Product images with dot products between upper and lower threshold values which are relatively close together are automatically to be classified as good ("acceptable") images. Product images with dot products outside upper and lower threshold values which are relatively far apart are automatically to be classified as bad ("unacceptable" or "rejectable") images. The operator of the system will be called upon to judge the acceptability of product images having dot products which do not fall in either of the foregoing categories.
After the foregoing statistical information has been computed, the information is used to progressively refine the initial discriminant function during the processing of a further relatively large number of product images. If for each successive product image in this group the dot product of the discriminant function and the image data is in the range of automatically acceptable images, the discriminant function is updated in accordance with the data for that image. If the dot product of the discriminant function and the image data is in the range of automatically rejectable images, the discriminant function is not updated in accordance with the data for that image. As a third possibility, if the product image is neither automatically acceptable nor automatically rejectable, the operator of the system is called upon to judge the acceptability of the image. If the operator judges the image acceptable, the discriminant function is updated as described above. Otherwise the discriminant function is not updated.
When the discriminant function has been sufficiently refined by the foregoing procedure, actual product inspection can begin using the refined discriminant function and the above-mentioned statistical information. As during discriminant function refining, when the dot product of the discriminant function and the image data for a product indicates that the image is acceptable, the product is accepted. Otherwise the product is rejected as having an unacceptable appearance.
The above-described systems work extremely well, but there is, of course, always room for further improvement. For example, many products have relatively large areas which include relatively little image information (e.g., a single solid color). Systems of the type disclosed in the above-mentioned prior patent are good at making sure that complicated image areas substantially conform to a predetermined norm. But in order to avoid improper rejection of too many acceptable images, the constraints employed in these systems cannot be too stringent. This tends to make these systems relatively insensitive to small defects or blemishes. Such defects or blemishes are especially noticeable in image areas which otherwise contain relatively little image information. So-called image segmentation may be used to segregate and separately process areas of various types in order to increase the overall sensitivity of the system without triggering false product rejections. However, the boundaries between optimum segments containing little image information and those containing more image information may be quite complex and difficult or impossible to specify in advance. At the very least, large amounts of operator time and a high degree of operator skill are required. It would be desirable to avoid the need for such operator resources. And even with a substantial investment of operator time and skill, it is unlikely that perfect or even close to perfect segregation of areas with little image information will be achieved.
In view of the foregoing, it is an object of this invention to improve and simplify methods and apparatus for inspecting the appearance of products.
It is another object of this invention to provide product appearance inspection methods and apparatus which have greater sensitivity without increased incidence of improper rejection of good products.
It is still another object of this invention to provide product appearance inspection methods and apparatus which can automatically identify image areas which contain relatively little image information and process those areas separately in a manner which is most appropriate to the information contained therein.